using System;
using System.Collections.Generic;
using System.Text;

namespace Eve.Data
{
    public class ContrabandType : EveAssociation<Faction, Type>
    {
        private double standingLoss;
        private double confiscateMinSec;
        private double fineByValue;
        private double attackMinSec;

        public Faction Faction
        {
            get { return From; }
        }
        public Type Type
        {
            get { return To; }
        }
        public double StandingLoss
        {
            get { return standingLoss; }
        }
        public double ConfiscateMinimumSeconds
        {
            get { return confiscateMinSec; }
        }
        public double FineByValue
        {
            get { return fineByValue; }
        }
        public double AttackMinimumSeconds
        {
            get { return attackMinSec; }
        }

        internal ContrabandType(DbDataRow dr)
            : base(dr.Database, new Faction(dr.Database, dr["factionID"]), new Type(dr.Database, dr["typeID"]))
        {
            Fill(dr);
        }
        internal ContrabandType(DbDataRow dr, Faction faction)
            : base(dr.Database, faction, new Type(dr.Database, dr["typeID"]))
        {
            Fill(dr);
        }

        private void Fill(DbDataRow dr)
        {
            standingLoss = dr["standingLoss"];
            confiscateMinSec = dr["confiscateMinSec"];
            fineByValue = dr["fineByValue"];
            attackMinSec = dr["attackMinSec"];
        }
    }
}
